#include <stdio.h>
// https://www.runoob.com/cprogramming/c-pointer-arithmetic.html
int main() {
  int x;
  int arr[10];
  printf("x ptr: %p, arr ptr: %p\n", &x, &arr);

  // set ptr x value
  int* xPtr = &x;
  printf("x ptr: %p\n", xPtr);
  *xPtr = 10;
  printf("x=%d\n", x);
  printf("*ptr=%d\n", *xPtr);

  // set x value
  x = 100;
  printf("after set x value 100\n");
  printf("x=%d\n", x);
  printf("*ptr=%d\n", *xPtr);

}